package org.goyo.main.domain.entity.storage;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.goyo.main.domain.entity.BaseEntryObject;
import org.goyo.main.domain.entity.base.Material;
/**
 * 库存拆包分录
 * 
 * @author chenchuan
 * 2014年11月12日
 */
@Entity
public class InventoryUnpackEntry extends BaseEntryObject implements Serializable {

	private static final long serialVersionUID = 1L;
	
	@ManyToOne
	@JoinColumn(name="materialId")
	private Material material;
	
	/**
	 * 商品名称	
	 */
	@Column
	private String materialName;
	/**
	 * 商品规格型号	
	 */
	@Column
	private String materialStandard;
	/**
	 * 批次	
	 */
	@Column
	private String lot;
	/**
	 * 条码	
	 */
	@Column
	private String barCode;
	/**
	 * 保质期	
	 */
	@Column
	private String expiraDate;
	/**
	 * 库存计量单位	
	 */
	@Column
	private String InventoryJilUnit;
	/**
	 * 库存数量	
	 */
	@Column
	private String InventoryQty;
	/**
	 * 转换计量单位	
	 */
	@Column
	private String switchJilUnit;
	/**
	 * 换算率	
	 */
	@Column
	private String matrixingRate;
	/**
	 * 拆包后数量	
	 */
	@Column
	private String umpackBackQty;
	public String getMaterialName() {
		return materialName;
	}
	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}
	public String getMaterialStandard() {
		return materialStandard;
	}
	public void setMaterialStandard(String materialStandard) {
		this.materialStandard = materialStandard;
	}
	public String getLot() {
		return lot;
	}
	public void setLot(String lot) {
		this.lot = lot;
	}
	public String getBarCode() {
		return barCode;
	}
	public void setBarCode(String barCode) {
		this.barCode = barCode;
	}
	public String getExpiraDate() {
		return expiraDate;
	}
	public void setExpiraDate(String expiraDate) {
		this.expiraDate = expiraDate;
	}
	public String getInventoryJilUnit() {
		return InventoryJilUnit;
	}
	public void setInventoryJilUnit(String inventoryJilUnit) {
		InventoryJilUnit = inventoryJilUnit;
	}
	public String getInventoryQty() {
		return InventoryQty;
	}
	public void setInventoryQty(String inventoryQty) {
		InventoryQty = inventoryQty;
	}
	public String getSwitchJilUnit() {
		return switchJilUnit;
	}
	public void setSwitchJilUnit(String switchJilUnit) {
		this.switchJilUnit = switchJilUnit;
	}
	public String getMatrixingRate() {
		return matrixingRate;
	}
	public void setMatrixingRate(String matrixingRate) {
		this.matrixingRate = matrixingRate;
	}
	public String getUmpackBackQty() {
		return umpackBackQty;
	}
	public void setUmpackBackQty(String umpackBackQty) {
		this.umpackBackQty = umpackBackQty;
	}
	public Material getMaterial() {
		return material;
	}
	public void setMaterial(Material material) {
		if(material != null &&("".equals(material.getUuid()) || material.getUuid()==null))
			this.material = null;
		else
			this.material = material;	
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
		
}
